package com.cskaoyan.bean;

import lombok.Data;

import java.util.Date;

@Data
public class User {
    private Integer id;

    private String username;

    private String password;

    private Byte gender;

    private Date birthday;

    private Date lastLoginTime;

    private String lastLoginIp;

    private Byte userLevel;

    private String nickname;

    private String mobile;

    private String avatar;

    private String weixinOpenid;

    private String sessionKey;

    private Byte status;

    private Date addTime;

    private Date updateTime;

    private Boolean deleted;

    public User() {
    }
    public User(UserInfoBean userInfoBean, String weixinOpenid) {
        Date date = new Date();
        this.addTime = date;
        this.updateTime = date;
        this.username = userInfoBean.getNickName();
        this.avatar = userInfoBean.getAvatarUrl();
        this.gender = new Byte(String.valueOf(userInfoBean.getGender()));
        this.nickname = userInfoBean.getNickName();
        this.weixinOpenid = weixinOpenid;
    }
}